import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Triangle {
    public static class YangTriangle{
        public  List<List<Integer>> YangHunTrangle(int numRows) {
            List<List<Integer>> ret = new ArrayList<>();
            List<Integer> list = new ArrayList<>();
            list.add(1);//第零行只有一位数1
            ret.add(list);//将第零行添加进去
            for (int i = 1; i < numRows; i++) {
                List<Integer> couRows = new ArrayList<>();
                couRows.add(1);//每一行首元素为1
                //处理中间数字
                List<Integer> proRow = ret.get(i-1);
                for (int j = 1; j < i; j++) {
                    int x = proRow.get(j-1)+proRow.get(j);
                    couRows.add(x);
                }
                //处理最后一位数字
                couRows.add(1);//最后一行为1
                ret.add(couRows);
            }
            return ret;
        }
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        YangTriangle yangTriangle = new YangTriangle();
        List<List<Integer>> ret = yangTriangle.YangHunTrangle(n);
        System.out.println(ret);
    }
}
